pv-on-hvm: Allow Linux and Xen paths to be overridden by the environment.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 6 Jun 2007 16:49:39 +0000 (17:49 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 6 Jun 2007 16:49:39 +0000 (17:49 +0100)
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
unmodified_drivers/linux-2.6/README
unmodified_drivers/linux-2.6/mkbuildtree

index f5ad4dbabe4747d03186d10bb5c1ade95004884e..f46da3d3aa01f80136a3cc1e88d892d425f1283e 100644 (file)
@@ -1,6 +1,12 @@
-To build, run ./mkbuildtree and then
+To build:
 
-make -C /path/to/kernel/source M=$PWD modules
+1. ./mkbuildtree
+   NB. You can override paths to Xen sources and XenLinux sources via
+       the XEN and XL environment variable.
+
+2. make -C /path/to/kernel/source M=$PWD modules
+   NB. The kernel sources here are your native kernel build tree, not
+       the XenLinux sources referred to in step 1.
 
 You get four modules, xen-platform-pci.ko, xenbus.ko, xen-vbd.ko, and
 xen-vnif.ko.  Load xen-platform-pci first, then xenbus, and then
index c1abd8a83ddd7e38dead84d474ece1734a8ee60d..5c0fdb428ff5effa17cd664c917b795b5fe47e22 100755 (executable)
@@ -10,8 +10,17 @@ fi
 
 C=$PWD
 
-XEN=$C/../../xen
-XL=$C/../../../linux-2.6.18-xen.hg
+if [ -n "$XEN" -a -d "$XEN" ]; then
+  XEN=$(cd $XEN && pwd)
+else
+  XEN=$C/../../xen
+fi
+
+if [ -n "$XL" -a -d "$XL" ]; then
+  XL=$(cd $XL && pwd)
+else
+  XL=$C/../../linux-2.6.18-xen.hg
+fi
 
 for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
     if ! echo $d | egrep -q back; then